package com.distribution.system.service.impl;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.distribution.system.manager.channel.channelInfo.enums.ChuanHeChannelEnum;
import com.distribution.system.service.JingDongService;
import com.distribution.system.utils.http.HttpRequestUtils;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: GodLu
 * @create: 2024-12-18 11:29
 * @description: 京东快递服务类
 */
@Service
public class JingDongServiceImpl implements JingDongService {
    private static String baseUrl = "https://alayn.baidu.com/express/appdetail/pc_express";

    @Override
    public JSONArray getLogistics(String orderNo) {
        String cb = "jsonp_" + System.currentTimeMillis() + "_26332";
        String url = baseUrl + "?query_from_srcid=51883&tokenV2=JQ7wevEhTV4E12yh2l%2BGaVz8u2cCXojWP13RiGbV5L0AzIhq8k8yVBhDjBeNQq0M&com=jd&nu=" + orderNo
                + "&qid=c9d2ade600096f23&cb=" + cb;
//        String reqParams = "&appid=" + gzptAppId + "&secret=" + gzptAppSecret +
//                "&code=" + code + "&grant_type=authorization_code";
        String rspStr = HttpRequestUtils.sendGet(url, null);
        System.out.println("rspStr = " + rspStr);
        return null;
    }
}
